package cn.dengta.webapp.user.entity.task;

import lombok.Getter;
import lombok.Setter;
import me.codeplayer.util.Assert;

/**
 * 亲密度等级规则
 */
@Getter
@Setter
public class IntimacyLevelConfig implements RuleConfig {

	protected Integer level;

	@Override
	public void validate() {
		Assert.isTrue(level != null && level > 0, "亲密度等级且至少1级必填！");
	}

	@Override
	public void init(RuleConfig config) {
		IntimacyLevelConfig cfg = (IntimacyLevelConfig) config;
		this.level = cfg.level;
	}

}
